<?php
/**
 * Created by Zhy
 * User: Zhy
 * Date: 2024/2/22
 * Time: 10:24
 */

namespace app\api\controller;

use app\api\model\Banner AS BannerModel;

class Banner extends Base
{
    public function __construct()
    {
        parent::__construct();

    }

    /**
     * 轮播图列表
     * @return \think\response\Json
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */
    public function bannerList(){
        $data = BannerModel::selectData();
        if($data){
            return json(['status' => 200, 'msg' => $data]);
        }else{
            return json(['status' => 200, 'msg' => []]);
        }
    }
}